﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using BaiDuMusic;
namespace AudioDemo
{
    /// <summary>
    /// Detail.xaml 的交互逻辑
    /// </summary>
    public partial class Detail : Window
    {
        BaiDuSong _song = null;
        public Detail()
        {
            InitializeComponent();

            _song = new BaiDuSong("14795583");
            this.DataContext = _song.CurrentSong;
        }
        private void button_Click(object sender, RoutedEventArgs e)
        {
            if (button.Content.ToString() == "开始")
            {
                mediaElement.Play();
                button.Content = "暂停";
            }
            else
            {
                mediaElement.Pause();
                button.Content = "开始";
            }
        }
    }
}
